<%@page import = "clothing.database.SaleManager" %>
<%@page import = "clothing.database.ItemManager" %>
<%@ include file = "templates/header.jsp" %>

<%

String uid = request.getParameter("uid");
String item_id = request.getParameter("item_id");
String purchase_p = request.getParameter("purchase_p");
String purchase_d = request.getParameter("purchase_d");
int eid = Integer.parseInt(uid);
int iid = Integer.parseInt(item_id);
double pp = Double.parseDouble(purchase_p);

SaleManager sm = new SaleManager();
sm.insert(eid, iid, pp, purchase_d);

ItemManager im = new ItemManager();
im.changeStatus(iid);


response.sendRedirect("DisplaySales.jsp");

%>
<%@ include file = "templates/footer.jsp" %>